package com.xuerhua.yxt.common.enums;

public enum LeaveType {
	
	SHI_JIA("1", "事假"),
	BING_JIA("2", "病假"),
	NIAN_JIA("3", "年假"),
	TIAO_XIU("4", "调休"),
	HUN_JIA("5", "婚假"),
	CHAN_JIA("6", "产假"),
	PEI_CHAN_JIA("7", "陪产假"),
	SANG_JIA("8", "丧假"),
	DAI_XIN_JIA("9", "带薪假"),
	OTHER("10", "周日晚上和周五下午");
	
	private final String code;
	
	private final String desc;
	
	private LeaveType(String code, String desc) {
		this.code = code;
		this.desc = desc;
	}
	
	public static String getDesc(String code) {
		for(LeaveType status : LeaveType.values()) {
			if(status.getCode().equals(code)) {
				return status.getDesc();
			}
		}
		return null;
	}

	public String getCode() {
		return code;
	}

	public String getDesc() {
		return desc;
	}
	
}
